﻿<phone:PhoneApplicationPage xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" xmlns:es="clr-namespace:Microsoft.Expression.Shapes;assembly=Microsoft.Expression.Drawing" 
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:ec="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions" 
    x:Class="CheckOilPrices.MainPage"
    d:DesignWidth="480" d:DesignHeight="728"
    mc:Ignorable="d"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="False">
	<phone:PhoneApplicationPage.Resources>
		<ItemsPanelTemplate x:Key="ItemsPanelTemplate1">
			<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="40,0,0,0"/>
		</ItemsPanelTemplate>
		<Style x:Key="ListBoxItemStyle1" TargetType="ListBoxItem">
			<Setter Property="Background" Value="Transparent"/>
			<Setter Property="BorderThickness" Value="0"/>
			<Setter Property="BorderBrush" Value="Transparent"/>
			<Setter Property="Padding" Value="0"/>
			<Setter Property="HorizontalContentAlignment" Value="Left"/>
			<Setter Property="VerticalContentAlignment" Value="Top"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="ListBoxItem">
						<Grid Height="90" Margin="0,0,35,0">
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="SelectionStates">
									<VisualState x:Name="Unselected"/>
									<VisualState x:Name="Selected">
										<Storyboard>
											<ColorAnimation Duration="0" To="Black" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="textBlock" d:IsOptimized="True"/>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Collapsed</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image1">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<DoubleAnimation Duration="0" To="1.449" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="image" d:IsOptimized="True"/>
											<ColorAnimation Duration="0" To="Black" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="textBlock_Copy" d:IsOptimized="True"/>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="SelectedUnfocused">
										<Storyboard>
											<ColorAnimation Duration="0" To="Black" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="textBlock" d:IsOptimized="True"/>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Collapsed</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image1">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<ColorAnimation Duration="0" To="Black" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="textBlock_Copy" d:IsOptimized="True"/>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="MouseOver"/>
									<VisualState x:Name="Disabled"/>
								</VisualStateGroup>
								<VisualStateGroup x:Name="FocusStates">
									<VisualState x:Name="Unfocused"/>
									<VisualState x:Name="Focused"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<StackPanel VerticalAlignment="Center"><TextBlock x:Name="textBlock" TextWrapping="Wrap" Text="PTT" VerticalAlignment="Top" FontFamily="Segoe WP SemiLight" FontSize="34.667" Margin="0" d:LayoutOverrides="Width" Foreground="#72000000"/>
								<TextBlock x:Name="textBlock_Copy" TextWrapping="Wrap" Text="ปตท." VerticalAlignment="Top" FontFamily="/CheckOilPrices;component/Fonts/Fonts.zip#TH SarabunPSK" FontSize="26.667" Foreground="#72000000" d:LayoutOverrides="Width" HorizontalAlignment="Center" Margin="0,-10,0,0"/></StackPanel>
							
							<Image x:Name="image" Height="16" Source="images/tri.png" Stretch="Fill" VerticalAlignment="Bottom" HorizontalAlignment="Center" Width="32" Visibility="Collapsed" RenderTransformOrigin="0.5,0.5">
								<Image.RenderTransform>
									<CompositeTransform/>
								</Image.RenderTransform>
							</Image>
							<Image x:Name="image1" Source="images/tri.png" Stretch="Fill" HorizontalAlignment="Center" Width="32" RenderTransformOrigin="0.5,0.5" Margin="0" Height="16" VerticalAlignment="Top" Visibility="Collapsed">
								<Image.RenderTransform>
									<CompositeTransform Rotation="180"/>
								</Image.RenderTransform>
							</Image>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="ListBoxStyle1" TargetType="ListBox">
			<Setter Property="Background" Value="Transparent"/>
			<Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
			<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
			<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
			<Setter Property="BorderThickness" Value="0"/>
			<Setter Property="BorderBrush" Value="Transparent"/>
			<Setter Property="Padding" Value="0"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="ListBox">
						<ScrollViewer x:Name="ScrollViewer" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Foreground="{TemplateBinding Foreground}" Padding="{TemplateBinding Padding}">
							<ItemsPresenter/>
						</ScrollViewer>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="ButtonStyle1" TargetType="Button">
			<Setter Property="Background" Value="Transparent"/>
			<Setter Property="BorderBrush" Value="{StaticResource PhoneForegroundBrush}"/>
			<Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
			<Setter Property="BorderThickness" Value="{StaticResource PhoneBorderThickness}"/>
			<Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilySemiBold}"/>
			<Setter Property="FontSize" Value="{StaticResource PhoneFontSizeMediumLarge}"/>
			<Setter Property="Padding" Value="10,3,10,5"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid Background="Transparent">
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="MouseOver"/>
									<VisualState x:Name="Pressed">
										<Storyboard>
											<ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="ButtonBackground" d:IsOptimized="True"/>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Disabled">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<DoubleAnimation Duration="0" To="0.2" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="image" d:IsOptimized="True"/>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Border x:Name="ButtonBackground" BorderBrush="#FFBFBFBF" Background="#0C000000" Margin="0" BorderThickness="1">
								<StackPanel Orientation="Horizontal">
									<ContentControl x:Name="ContentContainer" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,5"/>
									<Image x:Name="image" Margin="0" Source="icons/appbar.download.rest.png" Stretch="Fill" HorizontalAlignment="Right" VerticalAlignment="Center" Height="32" Width="32"/>
									</StackPanel>
								
							</Border>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="DatePickerStyle1" TargetType="toolkit:DatePicker">
			<Setter Property="Background" Value="{StaticResource PhoneTextBoxBrush}"/>
			<Setter Property="BorderThickness" Value="0"/>
			<Setter Property="Foreground" Value="{StaticResource PhoneTextBoxForegroundBrush}"/>
			<Setter Property="HorizontalContentAlignment" Value="Left"/>
			<Setter Property="PickerPageUri" Value="/Microsoft.Phone.Controls.Toolkit;component/DateTimePickers/DatePickerPage.xaml"/>
			<Setter Property="ValueStringFormat" Value="{}{0:d}"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="toolkit:DatePicker">
						<StackPanel>
							<ContentControl ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="12,0,12,-4" Foreground="#66FFFFFF"/>
							<Button x:Name="DateTimeButton" BorderThickness="{TemplateBinding BorderThickness}" Content="{TemplateBinding ValueString}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Foreground="#DE000000" Style="{StaticResource ButtonStyle1}" FontFamily="Segoe WP SemiLight" FontSize="21.333"/>
						</StackPanel>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="ListBoxStyle2" TargetType="ListBox">
			<Setter Property="Background" Value="Transparent"/>
			<Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
			<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
			<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
			<Setter Property="BorderThickness" Value="0"/>
			<Setter Property="BorderBrush" Value="Transparent"/>
			<Setter Property="Padding" Value="0"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="ListBox">
						<ItemsPresenter d:LayoutOverrides="Width"/>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="ListBoxStyle3" TargetType="ListBox">
			<Setter Property="Background" Value="Transparent"/>
			<Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
			<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
			<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
			<Setter Property="BorderThickness" Value="0"/>
			<Setter Property="BorderBrush" Value="Transparent"/>
			<Setter Property="Padding" Value="0"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="ListBox">
						<ItemsPresenter d:LayoutOverrides="Width"/>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<ControlTemplate x:Key="PhoneDisabledTextBoxTemplate" TargetType="TextBox">
			<ContentControl x:Name="ContentElement" BorderThickness="0" HorizontalContentAlignment="Stretch" Margin="{StaticResource PhoneTextBoxInnerMargin}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="Stretch"/>
		</ControlTemplate>
		<Style x:Key="TextBoxStyle3" TargetType="TextBox">
			<Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilyNormal}"/>
			<Setter Property="FontSize" Value="{StaticResource PhoneFontSizeMediumLarge}"/>
			<Setter Property="Background" Value="{StaticResource PhoneTextBoxBrush}"/>
			<Setter Property="Foreground" Value="{StaticResource PhoneTextBoxForegroundBrush}"/>
			<Setter Property="BorderBrush" Value="{StaticResource PhoneTextBoxBrush}"/>
			<Setter Property="SelectionBackground" Value="{StaticResource PhoneAccentBrush}"/>
			<Setter Property="SelectionForeground" Value="{StaticResource PhoneTextBoxSelectionForegroundBrush}"/>
			<Setter Property="BorderThickness" Value="{StaticResource PhoneBorderThickness}"/>
			<Setter Property="Padding" Value="2"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="TextBox">
						<Grid Background="Transparent">
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="MouseOver"/>
									<VisualState x:Name="Disabled">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EnabledBorder">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Collapsed</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DisabledOrReadonlyBorder">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="ReadOnly">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EnabledBorder">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Collapsed</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DisabledOrReadonlyBorder">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="DisabledOrReadonlyBorder">
												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneTextBoxBrush}"/>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="DisabledOrReadonlyBorder">
												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneTextBoxBrush}"/>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="DisabledOrReadonlyContent">
												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneTextBoxReadOnlyBrush}"/>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
								<VisualStateGroup x:Name="FocusStates">
									<VisualState x:Name="Focused">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="EnabledBorder">
												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneTextBoxEditBorderBrush}"/>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Unfocused"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Border x:Name="EnabledBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Margin="{StaticResource PhoneTouchTargetOverhang}" Background="White">
								<ContentControl x:Name="ContentElement" BorderThickness="0" HorizontalContentAlignment="Stretch" Margin="{StaticResource PhoneTextBoxInnerMargin}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="Stretch"/>
							</Border>
							<Border x:Name="DisabledOrReadonlyBorder" BorderBrush="{StaticResource PhoneDisabledBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="Transparent" Margin="{StaticResource PhoneTouchTargetOverhang}" Visibility="Collapsed">
								<TextBox x:Name="DisabledOrReadonlyContent" Background="Transparent" Foreground="{StaticResource PhoneDisabledBrush}" FontWeight="{TemplateBinding FontWeight}" FontStyle="{TemplateBinding FontStyle}" FontSize="{TemplateBinding FontSize}" FontFamily="{TemplateBinding FontFamily}" IsReadOnly="True" SelectionForeground="{TemplateBinding SelectionForeground}" SelectionBackground="{TemplateBinding SelectionBackground}" TextAlignment="{TemplateBinding TextAlignment}" TextWrapping="{TemplateBinding TextWrapping}" Text="{TemplateBinding Text}" Template="{StaticResource PhoneDisabledTextBoxTemplate}"/>
							</Border>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="ListBoxItemStyle2" TargetType="ListBoxItem">
			<Setter Property="Background" Value="Transparent"/>
			<Setter Property="BorderThickness" Value="0"/>
			<Setter Property="BorderBrush" Value="Transparent"/>
			<Setter Property="Padding" Value="0"/>
			<Setter Property="HorizontalContentAlignment" Value="Left"/>
			<Setter Property="VerticalContentAlignment" Value="Top"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="ListBoxItem">
						<Grid Height="90" Margin="0,0,35,0">
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="SelectionStates">
									<VisualState x:Name="Unselected"/>
									<VisualState x:Name="Selected">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Collapsed</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image1">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<DoubleAnimation Duration="0" To="1.449" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="image" d:IsOptimized="True"/>
											<ColorAnimation Duration="0" To="Black" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="textBlock1" d:IsOptimized="True"/>
											<ColorAnimation Duration="0" To="Black" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="textBlock_Copy" d:IsOptimized="True"/>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="SelectedUnfocused">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Collapsed</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image1">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<StackPanel VerticalAlignment="Center" Margin="0"><TextBlock x:Name="textBlock1" TextWrapping="Wrap" Text="Bangchak" VerticalAlignment="Top" FontFamily="Segoe WP SemiLight" FontSize="34.667" Margin="0" d:LayoutOverrides="Width" Foreground="#72000000"/>
								<TextBlock x:Name="textBlock_Copy" TextWrapping="Wrap" Text="บางจาก" VerticalAlignment="Top" FontFamily="/CheckOilPrices;component/Fonts/Fonts.zip#TH SarabunPSK" FontSize="26.667" Foreground="#72000000" d:LayoutOverrides="Width" HorizontalAlignment="Center" Margin="0,-10,0,0"/></StackPanel>
							<Image x:Name="image" Height="16" Source="images/tri.png" Stretch="Fill" VerticalAlignment="Bottom" HorizontalAlignment="Center" Width="32" Visibility="Collapsed" RenderTransformOrigin="0.5,0.5">
								<Image.RenderTransform>
									<CompositeTransform/>
								</Image.RenderTransform>
							</Image>
							<Image x:Name="image1" Source="images/tri.png" Stretch="Fill" HorizontalAlignment="Center" Width="32" RenderTransformOrigin="0.5,0.5" Margin="0" Height="16" VerticalAlignment="Top" Visibility="Collapsed">
								<Image.RenderTransform>
									<CompositeTransform Rotation="180"/>
								</Image.RenderTransform>
							</Image>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="ButtonStyle2" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Disabled"/>
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="MouseOver"/>
									<VisualState x:Name="Pressed">
										<Storyboard>
											<ColorAnimation Duration="0" To="#00000000" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="rectangle" d:IsOptimized="True"/>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Rectangle x:Name="rectangle" Fill="#0C000000" Stroke="#FFBFBFBF"/>	  				
							<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="10,0"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</phone:PhoneApplicationPage.Resources>
	<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsMenuEnabled="True" BackgroundColor="Black" ForegroundColor="White">
			<shell:ApplicationBar.MenuItems>
				<shell:ApplicationBarMenuItem x:Name="signoutFacebook" Click="signoutFacebook_Click" Text="Sign out Facebook" IsEnabled="False"/>
				<shell:ApplicationBarMenuItem x:Name="signoutTwitter" Click="signoutTwitter_Click" Text="Sign out Twitter" IsEnabled="False"/>
			</shell:ApplicationBar.MenuItems>
			<shell:ApplicationBarIconButton x:Name="fbShareBtn" Click="fbShareBtn_Click"  IconUri="/icons/Metro-Facebook-48.png" Text="Facebook"/>
			<shell:ApplicationBarIconButton x:Name="twShareBtn" Click="twShareBtn_Click" IconUri="/icons/Metro-Twitter3-48.png" Text="Twitter"/>
		</shell:ApplicationBar>
	</phone:PhoneApplicationPage.ApplicationBar>
 
    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

	<phone:PhoneApplicationPage.FontFamily>
		<StaticResource ResourceKey="PhoneFontFamilyNormal"/>
	</phone:PhoneApplicationPage.FontFamily>
	<phone:PhoneApplicationPage.FontSize>
		<StaticResource ResourceKey="PhoneFontSizeNormal"/>
	</phone:PhoneApplicationPage.FontSize>
	<phone:PhoneApplicationPage.Foreground>
		<StaticResource ResourceKey="PhoneForegroundBrush"/>
	</phone:PhoneApplicationPage.Foreground>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" MinHeight="42.045"/>
            <RowDefinition/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->

        <!--ContentPanel - place additional content here-->
        <StackPanel x:Name="TitlePanel" Background="Black" Margin="0" Grid.Row="0" Orientation="Horizontal">
    		<Image Source="icons/icon_oil.png" Stretch="Fill" Width="42" Margin="12,0,0,0"/>
    		<TextBlock x:Name="ApplicationTitle" Text="Oil Prices" Style="{StaticResource PhoneTextNormalStyle}" FontFamily="Segoe WP" FontSize="21.333" FontWeight="Bold" VerticalAlignment="Center" Margin="12,0" Foreground="White"/>
    	</StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="0">
        	<Grid>
        		<StackPanel Margin="0">
        			<Grid>
        				<ListBox x:Name="selectStationLB" SelectionChanged="selectStationLB_SelectionChanged" ItemsPanel="{StaticResource ItemsPanelTemplate1}" BorderThickness="0,0,0,1" BorderBrush="#FFBFBFBF" SelectedIndex="0" Foreground="#DE000000" Background="#0C000000" Style="{StaticResource ListBoxStyle1}" ScrollViewer.HorizontalScrollBarVisibility="auto" ScrollViewer.VerticalScrollBarVisibility="Disabled">
        					<ListBoxItem Content="ListBoxItem" Style="{StaticResource ListBoxItemStyle1}"/>
        					<ListBoxItem Content="ListBoxItem" Style="{StaticResource ListBoxItemStyle2}"/>
        				</ListBox>
        			</Grid>
        			<StackPanel Background="White" HorizontalAlignment="Right" Margin="0,10,22,0" Orientation="Horizontal">
        				<Button x:Name="compareBtn" Content="Compare price" Margin="0,0,10,0" Click="compareBtn_Click" Style="{StaticResource ButtonStyle2}" FontFamily="Segoe WP SemiLight" Foreground="Black" FontSize="21.333"/>
        				<toolkit:DatePicker x:Name="selectDate"  ValueChanged="selectDate_ValueChanged" VerticalAlignment="Top" HorizontalAlignment="Center" Style="{StaticResource DatePickerStyle1}" Margin="0"/>
        			</StackPanel>
        			<Grid Height="533">
        				<ListBox>
        					<TextBlock TextWrapping="Wrap" Text="Baht / L" Foreground="#A5000000" FontFamily="Segoe WP SemiLight" FontSize="21.333" Margin="388,10,0,0" FontWeight="Bold"/>
        					<ListBox x:Name="oilPriceLB" Width="436" Margin="22,0,0,0" Style="{StaticResource ListBoxStyle2}">
                                <ListBox.ItemTemplate>
                                    <DataTemplate>
                                    	<Grid Width="436" Background="#0C000000" Margin="0,0,0,2">
                                    		<Grid.ColumnDefinitions>
                                    			<ColumnDefinition Width="0.72*"/>
                                    			<ColumnDefinition Width="0.28*"/>
                                    		</Grid.ColumnDefinitions>
                                    		<TextBlock TextWrapping="Wrap" Text="{Binding O_Product}" Foreground="Black" VerticalAlignment="Center" Margin="10,0,0,0" d:LayoutOverrides="Width, GridBox" HorizontalAlignment="Left" FontSize="30"/>
                                    		<Grid Grid.Column="1">
                                    			<Grid.Background>
                                    				<SolidColorBrush Color="{StaticResource PhoneAccentColor}"/>
                                    			</Grid.Background>
                                    			<TextBlock TextWrapping="Wrap" Text="{Binding O_Price}" Foreground="White" VerticalAlignment="Center" Margin="0,0,10,0" d:LayoutOverrides="Width, GridBox" FontSize="38" HorizontalAlignment="Right"/>
                                    		</Grid>
                                    	</Grid>

                                    </DataTemplate>
                                </ListBox.ItemTemplate>

        					</ListBox>
        					<TextBlock TextWrapping="Wrap" Text="Baht / Kg" Foreground="#A5000000" FontFamily="Segoe WP SemiLight" FontSize="21.333" Margin="374,20,0,0" FontWeight="Bold"/>
        					<ListBox x:Name="gasPriceLB" Width="436" Margin="22,0,0,0" Style="{StaticResource ListBoxStyle3}">
                                <ListBox.ItemTemplate>
                                    <DataTemplate>
                                    	<Grid Width="436" Background="#0C000000" Margin="0,0,0,2">
                                    		<Grid.ColumnDefinitions>
                                    			<ColumnDefinition Width="0.72*"/>
                                    			<ColumnDefinition Width="0.28*"/>
                                    		</Grid.ColumnDefinitions>
                                    		<TextBlock TextWrapping="Wrap" Text="{Binding O_Product}" Foreground="Black" VerticalAlignment="Center" Margin="10,0,0,0" d:LayoutOverrides="Width, GridBox" HorizontalAlignment="Left" FontSize="30"/>
                                    		<Grid Grid.Column="1">
                                    			<Grid.Background>
                                    				<SolidColorBrush Color="{StaticResource PhoneAccentColor}"/>
                                    			</Grid.Background>
                                    			<TextBlock TextWrapping="Wrap" Text="{Binding O_Price}" Foreground="White" VerticalAlignment="Center" Margin="0,0,10,0" d:LayoutOverrides="Width, GridBox" FontSize="38" HorizontalAlignment="Right"/>
                                    		</Grid>
                                    	</Grid>
                                    </DataTemplate>
                                </ListBox.ItemTemplate>
        					</ListBox>
        				</ListBox>
        			</Grid>
        		</StackPanel>
        	</Grid></Grid>
        <Grid x:Name="twBlock" Background="White" Grid.RowSpan="2" Visibility="Collapsed">
        	<phone:WebBrowser x:Name="twLogin" VerticalAlignment="Top" HorizontalAlignment="Left" Width="480" Height="654" LoadCompleted="twLogin_LoadCompleted" IsScriptEnabled="True"/>
        	<Button x:Name="loginOkBtn" Content="Insert Twitter pin" Style="{StaticResource ButtonStyle2}" FontFamily="/CheckOilPrices;component/Fonts/Fonts.zip#TH SarabunPSK" Foreground="Black" FontSize="34.667" VerticalAlignment="Bottom" HorizontalAlignment="Center" Click="loginOkBtn_Click" Margin="0,0,0,16"/>
        </Grid>
        <Grid x:Name="fbBlock" Grid.RowSpan="2" Visibility="Collapsed">
        	<phone:WebBrowser x:Name="fbLogin" VerticalAlignment="Top" HorizontalAlignment="Left" Width="480" Height="800" LoadCompleted="fbLogin_LoadCompleted" IsScriptEnabled="True"/>
        </Grid>
        <Grid x:Name="twPinBlock" Grid.RowSpan="2" Visibility="Collapsed">
        	<Border Background="#FFF2F2F2" Height="217" Margin="2" VerticalAlignment="Top" BorderThickness="1" BorderBrush="#FFBFBFBF" CornerRadius="5">
        		<Grid>
        			<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Twitter pin" Margin="28,17,0,0" FontSize="26.667" d:LayoutOverrides="HorizontalAlignment, VerticalAlignment" VerticalAlignment="Top" Foreground="Black" FontFamily="Segoe WP Semibold"/>
        			<StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Right" Height="50" Margin="0,0,0,10">
        				<Button x:Name="pinOkBtn" Content="Ok" Width="150" HorizontalAlignment="Right" Click="pinOkBtn_Click" Opacity="0.8" FontSize="24" Style="{StaticResource ButtonStyle2}" Foreground="Black">
        					<Button.Background>
        						<SolidColorBrush Color="{StaticResource PhoneBackgroundColor}"/>
        					</Button.Background>
        				</Button>
        				<Button x:Name="pinCancelBtn" Content="Cancel" Width="150" HorizontalAlignment="Right" Click="pinCancelBtn_Click" Opacity="0.8" FontSize="24" Style="{StaticResource ButtonStyle2}" Foreground="Black" Margin="10,0">
        					<Button.Background>
        						<SolidColorBrush Color="{StaticResource PhoneBackgroundColor}"/>
        					</Button.Background>
        				</Button></StackPanel>
        			<TextBox x:Name="pinTxt" Margin="121,0,104,75" TextWrapping="Wrap" Style="{StaticResource TextBoxStyle3}" Foreground="#DE000000" TextAlignment="Center" VerticalAlignment="Bottom"/>
        		</Grid>
        	</Border>
        </Grid>
        <Grid x:Name="waitScr" Margin="0,-42.045,0,0" Grid.Row="1" Background="#E5000000" Visibility="Collapsed">
        	<toolkit:PerformanceProgressBar IsIndeterminate="True" VerticalAlignment="Center" Height="50">
        		<toolkit:PerformanceProgressBar.Foreground>
        			<SolidColorBrush Color="{StaticResource PhoneAccentColor}"/>
        		</toolkit:PerformanceProgressBar.Foreground>
        		<toolkit:PerformanceProgressBar.Background>
        			<SolidColorBrush Color="{StaticResource PhoneAccentColor}"/>
        		</toolkit:PerformanceProgressBar.Background>
        	</toolkit:PerformanceProgressBar>
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>
